<%- cache :controller => 'application', :action => 'layout', :format => 'beginning' do -%>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title><%= StringSetting.find_by_name("site-name").value %>: <%= @title %> (powered by CONTENID-OS)</title>
    <%= javascript_include_tag :defaults %>
    <%- # FIN DEL CACHE
    -%>
    <%- end -%>
    <%= stylesheet_link_tag session[:stylesheet] || 'estiloTinto.css' %>
  </head>

  <body>

    <div id="page">
      <div id="lineaI"></div>
      <div id="header">
        <h1 class="titulo"><%= StringSetting.find_by_name("site-name").value %><span class="titulo2"> (powered by CONTENID-OS)</span></h1>
      </div>
      <div id="subHeader">
        <div id="barraOb"></div>

        <div id="barraCl">
          <div id="linkContainer">
            <% if logged_in? -%>
              <%- cache :controller => 'application', :action => 'layout', :format => 'logged_links', :id => current_user.id do -%>
              <%= link_to (h(current_user.login) + ': Logout (Salir)'), :controller => :account, :action => :logout %>
              |
              <%= link_to 'Todos los cursos', :controller => :course, :action => :list %>
              |
              <%= link_to 'Mi Perfil', :controller => :account, :action => :view %>
              |
              <% if not is_admin? %>
                <%= link_to 'Mis Eventos', :controller => :event, :action => :list_own %>
              <% else %>
                <%= link_to 'Todos los Eventos', :controller => :event, :action => :list_own %>
              <% end %>
              |
              <% if not is_admin? %>
                <%= link_to 'Mis Cursos', :controller => :course, :action => :list_own %>
              <% end %>
              <%- end -%>
            <% end -%>
          </div>
        </div>
      </div>

      <div id="contenedorCentral">
        <%= render :partial => 'sideleft' %>
        <%= render :partial => 'rightbar' %>

        <div <%-if logged_in? -%>
          id="content"
          <%- else -%>
          id="contenido"
          <%- end %>>
          <%= render :partial => 'shared/hour' %>
          
          
          <div class="featuredRow"><p style="color: red"><%= flash[:error] %></p></div>
          <div class="featuredRow"><p style="color: green"><%= flash[:notice] %></p></div>
          <%= yield %>
          <%- cache :controller => 'application', :action => 'layout', :format => 'footer' do -%>
            <%- #COMIENZO DEL CACHE
            -%>
        </div>
		
      </div>
        <%= render :partial => 'shared/footer' %>
    </div>
	
  </body>
</html>
<%- #FIN DEL CACHE
-%>
<%- end -%>
